﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="spriter_data">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="folder">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="file">
                <xs:complexType>
                  <xs:attribute name="id" type="xs:unsignedByte" use="required" />
                  <xs:attribute name="name" type="xs:string" use="required" />
                  <xs:attribute name="width" type="xs:unsignedByte" use="required" />
                  <xs:attribute name="height" type="xs:unsignedByte" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="id" type="xs:unsignedByte" use="required" />
            <xs:attribute name="name" type="xs:string" use="required" />
          </xs:complexType>
        </xs:element>
        <xs:element name="entity">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="animation">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="mainline">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element maxOccurs="unbounded" name="key">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element maxOccurs="unbounded" name="object_ref">
                                  <xs:complexType>
                                    <xs:attribute name="id" type="xs:unsignedByte" use="required" />
                                    <xs:attribute name="timeline" type="xs:unsignedByte" use="required" />
                                    <xs:attribute name="key" type="xs:unsignedByte" use="required" />
                                    <xs:attribute name="z_index" type="xs:unsignedByte" use="required" />
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                              <xs:attribute name="id" type="xs:unsignedByte" use="required" />
                              <xs:attribute name="time" type="xs:unsignedShort" use="optional" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element maxOccurs="unbounded" name="timeline">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element maxOccurs="unbounded" name="key">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="object">
                                  <xs:complexType>
                                    <xs:attribute name="folder" type="xs:unsignedByte" use="required" />
                                    <xs:attribute name="file" type="xs:unsignedByte" use="required" />
                                    <xs:attribute name="x" type="xs:byte" use="optional" />
                                    <xs:attribute name="y" type="xs:unsignedByte" use="required" />
                                    <xs:attribute name="angle" type="xs:unsignedShort" use="optional" />
                                    <xs:attribute name="a" type="xs:decimal" use="optional" />
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                              <xs:attribute name="id" type="xs:unsignedByte" use="required" />
                              <xs:attribute name="spin" type="xs:byte" use="optional" />
                              <xs:attribute name="time" type="xs:unsignedShort" use="optional" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                        <xs:attribute name="id" type="xs:unsignedByte" use="required" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="id" type="xs:unsignedByte" use="required" />
                  <xs:attribute name="name" type="xs:string" use="required" />
                  <xs:attribute name="length" type="xs:unsignedShort" use="required" />
                  <xs:attribute name="looping" type="xs:boolean" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="id" type="xs:unsignedByte" use="required" />
            <xs:attribute name="name" type="xs:string" use="required" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="scml_version" type="xs:decimal" use="required" />
      <xs:attribute name="generator" type="xs:string" use="required" />
      <xs:attribute name="generator_version" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>
</xs:schema>